import { createApp } from 'vue';
import ElementPlus from 'element-plus';
import AndDesignVue from 'ant-design-vue';
import { createFromIconfontCN } from '@ant-design/icons-vue';
// 导入所有图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import 'element-plus/dist/index.css';
import App from '../../src/views/digitalTeachingMaterial/index.vue';
import { createPinia } from 'pinia';
const app = createApp(App);
const Pinia = createPinia();

// 创建icon图标
const IconFont = createFromIconfontCN({
  // 读取本地图标库
  scriptUrl: import('../../src/assets/iconfont/iconfont.js'),
});

// 全局注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.component('IconFont', IconFont);

app.use(Pinia).use(ElementPlus).use(AndDesignVue).mount('#app');
